<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>统计帖子标题的长度</title>
</head>
<body>
    <form action="" method="post">
        标题：<input type="text" name="title">
        <br>
        内容：<textarea name="text" id="" cols="30" rows="10"></textarea>
        <input type="submit" name="sub" value="提交">
    </form>
</body>
</html>
<?php
/**
 * User: lie
 * Date: 2020/12/3 16:15
 * Title: 统计帖子标题的长豆
 * Description:
 * Error:
 */
if (!empty($_POST['sub'])) {
    echo '标题的长度是：'.strlen($_POST['title']);
}


